home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 9413 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  927 b 

  1. Path: oasis.rad.upenn.edu!daniels
  2. From: daniels@oasis.rad.upenn.edu (Jamie Daniels)
  3. Newsgroups: comp.lang.c++
  4. Subject: passing arguments to main()
  5. Date: 1 Mar 1996 16:35:04 GMT
  6. Organization: University of Pennsylvania
  7. Message-ID: <4h78vo$nqq@netnews.upenn.edu>
  8. NNTP-Posting-Host: oasis.rad.upenn.edu
  9. X-Newsreader: TIN [version 1.2 PL2-upenn1.1]
  10.  
  11. Hello,
  12.  
  13. I have a question about c I am not very good with programming. I have this
  14. project that I want to take two strings one a name the other being an 80
  15. character message(sentence). I want it to spit out a simplt print statement at
  16. an Unix prompt. But I don't know how to pass arguments to main(). also I can't
  17. get the output to be entered in at the unix prompt. I want the output to be a
  18. command. for a simple example
  19.  
  20.  printf("ping 165.234.323.222");
  21.  
  22. will not ping this address it only prints this statement before the prompt
  23.  
  24.  any help would be greatly appreciated
  25. --
  26. Jamie
  27.